from base.search_base import SearchBase


class SearchPage(SearchBase):

    def search_bar_for_input_send(self, driver, value):
        search_bar_for_input_xpath = self.search_bar_for_input()
        return self.send_keys_new(driver, locator_value=search_bar_for_input_xpath, value=value)

    def search_button_click(self, driver):
        search_button_xpath = self.search_button()
        return self.click_new(driver, locator_value=search_button_xpath)

    def get_book_title_text(self, driver):
        book_title_xpath = self.book_title()
        return self.get_text(driver, locator_value=book_title_xpath)
